﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MedicalAdviser.Portable.DataTypes.DomainObjects;
using MedicalAdviser.Portable.DataTypes.WsTypes;

namespace MedicalAdviser.Controllers
{
    /// <summary>
    /// Make the abstration from DAL implemention
    /// brigd between Service Request and the DAL 
    /// </summary>
    public class DrugOperations
    {
        public static CdoDrug GetDrugInformation(AppInteration tFilter )
        {
            return DAL.SelectOperation.GetDrugInfo(tFilter.Drug.CodEmbalagem, tFilter.Drug.CodMedicamento,
                                                   tFilter.ClientAuth.AccessToken);
        }

        public static List<CdoDrug> GetEquivalentLowCostDrugs( AppInteration tFilter )
        {

            return DAL.SelectOperation.EquivalentsDrugs(tFilter.Drug);
        }


        public static List<CdoDrug> QuickSearch(SearchDrug tFilter)
        {
            return DAL.SelectOperation.QuickSearch(tFilter);
        }


        public static List<CdoDrug> RefinedSearch(SearchDrug tFilter)
        {
            return null;
        }

    }
}
